package edu.suda.xsap.dto.convert;
import edu.suda.xsap.dto.HomePageDto;
import edu.suda.xsap.entity.HomePage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface HomePageConvert {
    @Mapping(source="memCount", target = "memCount")
    @Mapping(source="activeCount", target = "activeCount")
    @Mapping(source="appointmentCount", target = "appointmentCount")
    @Mapping(source="logCount", target = "logCount")
    @Mapping(source="day", target = "day")
    @Mapping(source = "receivedMoney",target = "rechargeMoney")
    @Mapping(source="memberCardName", target = "cardName")
    @Mapping(source="count", target = "count")
    HomePageDto toDto(HomePage homePage);
    List<HomePageDto> toDtoList(List<HomePage> homePages);
}
